//
//  ZDOrderGoodsCell.m
//  ZDPension
//
//  Created by 刘甲奇 on 2017/6/20.
//  Copyright © 2017年 maker. All rights reserved.
//

#import "ZDOrderGoodsCell.h"
#import "UIImageView+WebCache.h"

@interface ZDOrderGoodsCell()

@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *goodsNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *goodsNumberLabel;


@end

@implementation ZDOrderGoodsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(ZDShoppCarGoodsModel *)model
{
    [self.icon sd_setImageWithURL:[NSURL URLWithString:model.goods_image_url] placeholderImage:[UIImage imageNamed:@"zwt"]];
    self.goodsNameLabel.text = model.goods_name;
    self.priceLabel.text = [NSString stringWithFormat:@"¥:%@",model.goods_price];
    self.goodsNumberLabel.text = [NSString stringWithFormat:@"x %@",model.goods_num];
}

/**
 设置普通商品的

 @param goodsDetailModel <#goodsDetailModel description#>
 */
- (void)setGoodsDetailModel:(ZDGoodsDetailModel *)goodsDetailModel
{
    [self.icon sd_setImageWithURL:[NSURL URLWithString:goodsDetailModel.goods_image_url] placeholderImage:[UIImage imageNamed:@"zwt"]];
    self.goodsNameLabel.text = goodsDetailModel.goods_name;
    self.priceLabel.text = [NSString stringWithFormat:@"¥:%@",goodsDetailModel.goods_price];
    self.goodsNumberLabel.text = [NSString stringWithFormat:@"x %@",goodsDetailModel.goods_num];
}
@end
